package com.mybatis.service.shop.impl;

import java.util.ArrayList;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import javax.servlet.http.HttpServletRequest;

import org.apache.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.alibaba.fastjson.JSONObject;
import com.alibaba.fastjson.TypeReference;
import com.github.pagehelper.PageHelper;
import com.mybatis.basic.entity.AjaxJson;
import com.mybatis.basic.service.impl.BasicServiceImpl;
import com.mybatis.dao.shop.GoodsTypeDao;
import com.mybatis.entity.shop.GoodsBase;
import com.mybatis.entity.shop.GoodsType;
import com.mybatis.service.shop.GoodsBaseService;
import com.mybatis.service.shop.GoodsTypeService;

@Service
public class GoodsBaseServiceImpl extends BasicServiceImpl<GoodsBase> implements GoodsBaseService{

	private static final Logger Log = Logger.getLogger(GoodsBaseServiceImpl.class);

	@Autowired
	private GoodsTypeDao goodsTypeDao;

	@Override
	public AjaxJson add(GoodsBase goodsBase) {
		AjaxJson ajaxJson = new AjaxJson();
		try {
			
			ajaxJson.setSuccess(true);
			ajaxJson.setMsg("添加成功");
		} catch (Exception e) {
			e.printStackTrace();
			ajaxJson.setSuccess(false);
			ajaxJson.setMsg("程序出错，添加失败");
		}
		return ajaxJson;
	}

	@Override
	public AjaxJson queryOne(Integer id) {
		AjaxJson ajaxJson = new AjaxJson();
		try {
			ajaxJson.setSuccess(true);
		} catch (Exception e) {
			e.printStackTrace();
			ajaxJson.setSuccess(false);
			ajaxJson.setMsg("查询失败");
		}
		return ajaxJson;
	}

	@Override
	public AjaxJson queryListByPage(GoodsBase goodsBase,Integer page,Integer rows) {
		AjaxJson ajaxJson = new AjaxJson();
		try {
			
		} catch (Exception e) {
			e.printStackTrace();
			ajaxJson.setSuccess(false);
			ajaxJson.setMsg("程序出错，查询失败");
		}
		return ajaxJson;
	}

	@Override
	public AjaxJson del(Integer id) {
		AjaxJson ajaxJson = new AjaxJson();
		try {
			
		} catch (Exception e) {
			e.printStackTrace();
			ajaxJson.setSuccess(false);
			ajaxJson.setMsg("程序错误，操作失败");
		}
		return ajaxJson;
	}

	@Override
	public AjaxJson mod(GoodsBase goodsBase) {
		AjaxJson ajaxJson = new AjaxJson();
		try {
			
		} catch (Exception e) {
			e.printStackTrace();
			ajaxJson.setSuccess(false);
			ajaxJson.setMsg("程序错误，操作失败");
		}
		return ajaxJson;
	}
	
}
